package com.company.project.learning.thread;

/**
 * @Author: zhaoqi
 * @Date: 11/16/2019 10:07 PM
 * @Version 1.0
 */

public class DemoThread extends Thread {

    public DemoThread(String name){
        super(name);
    }

    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 10000; j++) {
                System.out.println(this.getName()+j);
            }
        }
    }

    public static void main(String[] args) {
        DemoThread demo1 = new DemoThread("李白");
        DemoThread demo2 = new DemoThread("张飞");        demo1.start();
        demo2.start();
    }


}
